<?php 
$seitcm_class_module = isset($_GET['module']) ? $_GET['module'] : 'list';
switch ($seitcm_class_module) {
	case 'list':
		if ( !(current_user_can( 'seitcm_class_list' ) || current_user_can( 'seitcm_class_responsible_list' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_listtable_view.php';
		break;
	case 'add':
		if ( !(current_user_can( 'seitcm_class_add' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_add_view.php';
		break;
	case 'upgrade':
		if ( !(current_user_can( 'seitcm_class_add' ) && current_user_can( 'seitcm_registration' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_upgrade_view.php';
		break;
	case 'detail':
		if ( !(current_user_can( 'seitcm_class_list' ) || current_user_can( 'seitcm_class_responsible_list' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_detail_view.php';
		break;
	case 'update':
		if ( !(current_user_can( 'seitcm_class_update' ) || current_user_can( 'seitcm_update_responsible_class' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_update_view.php';
		break;
	case 'studentlist':
		if ( !(current_user_can( 'seitcm_student_list' )||current_user_can( 'seitcm_class_list_student' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_studentlist_view.php';
		break;
	case 'schedule':
		if ( !(current_user_can( 'seitcm_schedule_list' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_schedule_view.php';
		break;
	case 'rollup':
		if ( !(current_user_can( 'seitcm_rollup' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access this page.' ) );
		}
		require_once 'seitcm_class_rollup_view.php';
		break;
	case 'score':
		if ( !(current_user_can( 'seitcm_scores_list' ))){
			wp_die( __( 'SEICM: You do not have sufficient permissions to access score.' ) );
		}
		require_once 'seitcm_class_scores_view.php';
		break;
}
?>